<?php
/*
 **************************************************************************************************
 *	The main template file
 *
 *	This is the most generic template file in a wordpress theme
 *	It is used to display a page when nothing more specific matches a query
 **************************************************************************************************
*/
?>

<?php get_header(); ?><!-- load header.php -->

<section id="content">
	<div class="container">
		<div class="row">
			<!-- main content area -->
			<div class="span8">
			<?php
				// checks if the current wordpress query has any results to loop over
				if ( have_posts() ) :
					while ( have_posts() ) :
						// iterate the post index in the loop
						the_post();
						// load a template part ( load content-{post_format}.php )
						get_template_part( 'content', get_post_format() );
					endwhile;

					// paging navigation
					if ( function_exists( 'wp_pagenavi' ) ) :
						wp_pagenavi(); // pagenavi plugin
					else :
						prototype_paging_nav();
					endif;
				else :
					// load content-none.php
					get_template_part( 'content', 'none' );
				endif;
			?>
			</div>
			<!-- sidebar area -->
			<div class="span4">
				<aside class="right-sidebar">
					<!-- bootstrap tab -->
					<div class="widget-tabs">
						<div class="tabs">
							<ul class="nav nav-tabs">
								<li class="active"><a href="#one" data-toggle="tab">Popular</a></li>
								<li><a href="#two" data-toggle="tab">Recent</a></li>
							</ul>
							<div class="tab-content">
								<div class="tab-pane active" id="one">
									<ul class="popular">
										<li>
											<p><a href="#">Dorlorem ipsum et mea dolor sit amet</a></p>
										</li>
									</ul>
								</div>
								<div class="tab-pane" id="two">
									<ul class="recent">
										<li>
											<p><a href="#">Fierent adipisci iracundia est ei, usu timeam persius ea</a></p>
										</li>
									</ul>
								</div>
							</div>
						</div>
					</div>
					<?php get_sidebar(); ?><!-- load sidebar.php -->
				</aside>
			</div>
		</div>
	</div>
</section>

<?php get_footer(); ?><!-- load footer.php -->